Xbasic
CPUCount Function
Syntax
Count as N = CPUCount()
Description
Get number of processors available on the system. The CPUCount() function returns the number of available CPUs. Hyperthreaded systems (such as my laptop) appear to have multiple CPUs and behave accordingly. It is possible on some systems to disable a CPU.
Example
This example shows that the computer has only one processor.
? CPUCount() = 1
See Also